<style type="text/css">
	#content { display: none; }
</style>

<h1>CMS</h1>
	<p>
	
	<form method="post" action="">
	<div>
		<fieldset style="width:400px;">
		<legend>Template/Section</legend>
		<table cellspacing="0" cellpadding="4">
		<tr>
				<td>
				<select id="tpl-section" name="tpl-section">
					<option value="">-- Choose --</option>
					<optgroup label="E-mails">
					<?php foreach($tpl_emails as $tpl_email){
								echo "<option value=\"email_".$tpl_email->id."\">".$tpl_email->type_name."</option>\n";
						  }
					?>
					</optgroup>
					<optgroup label="Page sections">
					<?php foreach($tpl_pages as $tpl_page){
								echo "<option value=\"page_".$tpl_page->id."\">".$tpl_page->type_name."</option>\n";
						  }
					?>
					</optgroup>
				</select>
				&nbsp;
				<span id="tpl_stat"></span>
				</td>
		</tr>
		</table>
		</fieldset>
		<br />
		<table cellspacing="0" cellpadding="4">
		<tr id="subjecy-row" style="display:none;">
			<td>Subject</td>
			<td><input size="100" type="text" id="subject" name="subject" value="" /></td>
		</tr>
		<tr>
			<td colspan="2">
			<textarea id="editor-content" name="editor-content" rows="15" cols="80" style="width: 80%" class="tinymce"></textarea>
			</td>
		</tr>
		<tr>
			<td colspan="2">
				<!--<br />
				<input type="checkbox" name="autosave" value="yes" /> Enable auto-save <span id="autosave-stat"></span>-->
				<br />
				<input type="button" name="bt-save" id="bt-save" value="Save" /> <span id="op_stat"></span>
			</td>
		</tr>
		</table>
		
		
		<h2 id="mergefieldstoggle">Available Merge Fields</h2>

<div id="mergefields" style="border:1px solid #8FBCE9;background:#ffffff;color:#000000;padding:5px;height:300px;overflow:auto;font-size:10px;z-index:10;">

<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="50%" valign="top">
<b>Client Related</b><br />
<table>
	<tr><td width="150"><a href="#" onclick="insertMergeField('{client_id}');return false">ID</td><td>{client_id}</a></td></tr>
	<tr><td><a href="#" onclick="insertMergeField('{client_name}');return false">Client Name</td><td>{client_name}</a></td></tr>
	<tr><td><a href="#" onclick="insertMergeField('{client_first_name}');return false">First Name</td><td>{client_first_name}</a></td></tr>
	<tr><td><a href="#" onclick="insertMergeField('{client_last_name}');return false">Last Name</td><td>{client_last_name}</a></td></tr>
	<tr><td><a href="#" onclick="insertMergeField('{client_country}');return false">Country</td><td>{client_country}</a></td></tr>
	<tr><td><a href="#" onclick="insertMergeField('{client_email}');return false">Email Address</td><td>{client_email}</a></td></tr>
	<tr><td><a href="#" onclick="insertMergeField('{client_password}');return false">Password</td><td>{client_password}</a></td></tr>
	<tr><td><a href="#" onclick="insertMergeField('{client_phonenumber}');return false">Phone Number</td><td>{client_phonenumber}</a></td></tr>
	<tr><td><a href="#" onclick="insertMergeField('{client_address1}');return false">Address 1</td><td>{client_address1}</a></td></tr>
	<tr><td><a href="#" onclick="insertMergeField('{client_address2}');return false">Address 2</td><td>{client_address2}</a></td></tr>
	<tr><td><a href="#" onclick="insertMergeField('{client_city}');return false">City</td><td>{client_city}</a></td></tr>
	<tr><td><a href="#" onclick="insertMergeField('{client_state}');return false">State/Region</td><td>{client_state}</a></td></tr>
	<tr><td><a href="#" onclick="insertMergeField('{client_company}');return false">Company</td><td>{client_company}</a></td></tr>
	<tr><td><a href="#" onclick="insertMergeField('{client_postcode}');return false">Postcode</td><td>{client_postcode}</a></td></tr>
	<tr><td><a href="#" onclick="insertMergeField('{client_mt4_id}');return false">MT4 ID</td><td>{client_mt4_id}</a></td></tr>
	<tr><td><a href="#" onclick="insertMergeField('{client_mirror_login_id}');return false">Mirror login ID</td><td>{client_mirror_login}</a></td></tr>
	<tr><td><a href="#" onclick="insertMergeField('{client_group}');return false">MT4 Group</td><td>{client_group}</a></td></tr>
	<tr><td><a href="#" onclick="insertMergeField('{client_mt4_agent}');return false">MT4 Agent</td><td>{client_mt4_agent}</a></td></tr>
	<tr><td><a href="#" onclick="insertMergeField('{client_leverage}');return false">Leverage</td><td>{client_leverage}</a></td></tr>
	<tr><td><a href="#" onclick="insertMergeField('{client_stored_doc}');return false">Stored doc</td><td>{client_stored_doc}</a></td></tr>
	<tr><td><a href="#" onclick="insertMergeField('{client_signature_doc}');return false">Signature image</td><td>{client_signature_image}</a></td></tr>
</table><br /><br />

<b>Other</b><br />
<table>
	<tr><td width="150"><a href="#" onclick="insertMergeField('{admin_email}');return false">Admin e-mail</td><td>{admin_email}</a></td></tr>
	<tr><td width="150"><a href="#" onclick="insertMergeField('{company_name}');return false">Company name</td><td>{company_name}</a></td></tr>
	<tr><td width="150"><a href="#" onclick="insertMergeField('{logo}');return false">Logo</td><td>{logo}</a></td></tr>
	<tr><td width="150"><a href="#" onclick="insertMergeField('{password_confirm_url}');return false">Password confirmation URL</td><td>{password_confirm_url}</a></td></tr>
	<tr><td width="150"><a href="#" onclick="insertMergeField('{password_reset_url}');return false">Password reset URL</td><td>{password_reset_url}</a></td></tr>
	<tr><td width="150"><a href="#" onclick="insertMergeField('{payment_amount}');return false">Payment amount</td><td>{payment_amount}</a></td></tr>
	<tr><td width="150"><a href="#" onclick="insertMergeField('{liberty_reserve_account}');return false">Liberty reserve account</td><td>{liberty_reserve_account}</a></td></tr>
	<tr><td width="150"><a href="#" onclick="insertMergeField('{liberty_reserve_batch_code}');return false">Liberty reserve batch code</td><td>{liberty_reserve_batch_code}</a></td></tr>
	<tr><td width="150"><a href="#" onclick="insertMergeField('{payment_date}');return false">Payment date</td><td>{payment_date}</a></td></tr>
	<tr><td width="150"><a href="#" onclick="insertMergeField('{currency}');return false">Currency</td><td>{currency}</a></td></tr>
	<tr><td width="150"><a href="#" onclick="insertMergeField('{payment_amount}');return false">Payment amount</td><td>{payment_amount}</a></td></tr>
	<tr><td width="150"><a href="#" onclick="insertMergeField('{sender_bank}');return false">Sender bank</td><td>{sender_bank}</a></td></tr>
	<tr><td width="150"><a href="#" onclick="insertMergeField('{sender_ac_name}');return false">Sender A/C name</td><td>{sender_ac_name}</a></td></tr>
	<tr><td width="150"><a href="#" onclick="insertMergeField('{sender_bank_ac_no}');return false">Sender bank a/c no.</td><td>{sender_bank_ac_no}</a></td></tr>
	<tr><td width="150"><a href="#" onclick="insertMergeField('{beneficiary_bank}');return false">Beneficiary bank</td><td>{beneficiary_bank}</a></td></tr>
	<tr><td width="150"><a href="#" onclick="insertMergeField('{beneficiary_ac_no}');return false">Beneficiary a/c no.</td><td>{beneficiary_ac_no}</a></td></tr>
	<tr><td width="150"><a href="#" onclick="insertMergeField('{payment_id}');return false">Payment ID</td><td>{payment_id}</a></td></tr>
	<tr><td width="150"><a href="#" onclick="insertMergeField('{purse}');return false">Purse</td><td>{purse}</a></td></tr>
	
</table><br /><br />


</td></tr>
</table>
</div>
		
	</div>
</form>
<script type="text/javascript">
if (document.location.protocol == 'file:') {
	alert("The examples might not work properly on the local file system due to security settings in your browser. Please use a real webserver.");
}
</script>
	
	</p>